<?php

namespace Vozminoski\StoreBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Size
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="Vozminoski\StoreBundle\Entity\SizeRepository")
 */
class Size
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var integer
     *
     * @ORM\Column(name="size", type="integer")
     */
    private $size;

    /**
     * @var name
     *
     * @ORM\Column(name="shoe_size", type="string")
     */
    private $shoe_size;

    /**
     * @var integer
     *
     * @ORM\Column(name="sort_order", type="integer")
     */
    private $order;

    /**
     * @var boolean
     *
     * @ORM\Column(name="is_active", type="boolean")
     */
    private $is_active;

    /**
     * @ORM\OneToMany(targetEntity="OrderItems", mappedBy="order")
     */
    protected $items;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set size
     *
     * @param integer $size
     * @return Size
     */
    public function setSize($size)
    {
        $this->size = $size;
    
        return $this;
    }

    /**
     * Get size
     *
     * @return integer 
     */
    public function getSize()
    {
        return $this->size;
    }

    /**
     * Set shoe_size
     *
     * @param string $shoeSize
     * @return Size
     */
    public function setShoeSize($shoeSize)
    {
        $this->shoe_size = $shoeSize;
    
        return $this;
    }

    /**
     * Get shoe_size
     *
     * @return string
     */
    public function getShoeSize()
    {
        return $this->shoe_size;
    }

    /**
     * Set order
     *
     * @param integer $sortOrder
     * @return Size
     */
    public function setOrder($sortOrder)
    {
        $this->order = $sortOrder;
    
        return $this;
    }

    /**
     * Get order
     *
     * @return integer 
     */
    public function getOrder()
    {
        return $this->order;
    }

    /**
     * Set is_active
     *
     * @param boolean $isActive
     * @return Size
     */
    public function setIsActive($isActive)
    {
        $this->is_active = $isActive;
    
        return $this;
    }

    /**
     * Get is_active
     *
     * @return boolean 
     */
    public function getIsActive()
    {
        return $this->is_active;
    }

    function __toString()
    {
        return $this->getSize() . ' (' . $this->getShoeSize() . ')';
    }
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->items = new \Doctrine\Common\Collections\ArrayCollection();
    }
    
    /**
     * Add items
     *
     * @param \Vozminoski\StoreBundle\Entity\OrderItems $items
     * @return Size
     */
    public function addItem(\Vozminoski\StoreBundle\Entity\OrderItems $items)
    {
        $this->items[] = $items;
    
        return $this;
    }

    /**
     * Remove items
     *
     * @param \Vozminoski\StoreBundle\Entity\OrderItems $items
     */
    public function removeItem(\Vozminoski\StoreBundle\Entity\OrderItems $items)
    {
        $this->items->removeElement($items);
    }

    /**
     * Get items
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getItems()
    {
        return $this->items;
    }
}